﻿<MRow Justify="JustifyTypes.Center" Align="AlignTypes.Center">
    <MCol Cols="12" Md="6">
        <MMobilePickerView @bind-Value="_value"
                           Columns="@_columns"
                           TColumn="List<string>"
                           TColumnItem="string"
                           TColumnItemValue="string"
                           ItemValue="item => item"
                           ItemText="item => item"
                           ItemDisabled="item => item == NowDayOfWeek">
        </MMobilePickerView>
    </MCol>
    <MCol Cols="12" Md="6" Class="text-center">
        Value: @string.Join(" ", _value)
    </MCol>
</MRow>

@code {

    private static readonly string NowDayOfWeek = DateTime.Now.DayOfWeek.ToString();
    private static readonly string NowAmPm = DateTime.Now.Hour > 12 ? "PM" : "AM";

    private readonly List<List<string>> _columns = new()
    {
        new List<string>
        {
            DayOfWeek.Monday.ToString(),
            DayOfWeek.Tuesday.ToString(),
            DayOfWeek.Wednesday.ToString(),
            DayOfWeek.Thursday.ToString(),
            DayOfWeek.Friday.ToString(),
            DayOfWeek.Saturday.ToString(),
            DayOfWeek.Sunday.ToString()
        },
        new List<string>
        {
            "AM",
            "PM"
        }
    };

    private List<string> _value = new() { NowDayOfWeek, NowAmPm };

}
